Readme for Learning in the Oil Futures Markets: Evidence and Macroeconomic Implications
There are two zip files that will allow for replication work 
The empirical work is stored in the zipfile called empiricalwork. 
The model work is stored in the zipfile called restat.zip, inside that zip file is a README file for that code. 
Below is the details for the empirical work.

Empirical Work Details. 
Because I got the oil price data from Bloomberg, I do not have the rights to redistribute.  
 There is the main file   ReplicateLMV2021Restat.m.
It is the only file that you need to run to make the charts. 
It calls bettermonthavg.m, which creates a monthly average from a daily series ignoring missing values. 
There are five programs associated with model estimation. 
ll.m is the univariate likelihood function that calls ecn_filter_kalman.m 
llf_restat.m is the likelihood function for the bivariate estimation. 
The programs mykalmanwithgain.m   and mykalman.m  are the implementation of the Kalman filter used to produce the futures forecast. 

Mkswtable.m is a little script that creates Scientific Workplace code that can then be “paste internal” into a swp program.  
The programs mkfigcoef.m   mkfigsix.m    mkfigsixbw.m  mkfigtwo.m   just do the formatting for the charts.  

Software used in the final version. 
ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.8.0.1323502 (R2020a)
MATLAB                                                Version 9.8         (R2020a)
Optimization Toolbox                                  Version 8.5         (R2020a)
Parallel Computing Toolbox                            Version 7.2         (R2020a)
